package com.xbongbong.pro.sharepermission.pojo;

import com.xbongbong.paas.enums.DateTimeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author 李翔
 * @date 2023/3/9
 * @description
 */
@Getter
@Setter
@ToString
public class SharePermissionConditionPojo implements Serializable {
    private static final long serialVersionUID = -1L;
    /**
     * 字段类型
     */
    @NotNull(message = "{dto.msg.fieldType.NotNull}")
    private Integer fieldType;
    /**
     * 字段对应的标题
     */
    private String name;
    /**
     * 字段标识
     */
    @NotEmpty(message = "{dto.msg.attr.NotEmpty}")
    private String attr;
    /**
     * 子表单字段标识
     */
    private String subAttr;
    /**
     * @see com.xbongbong.paas.enums.ConditionEnum
     */
    @NotNull(message = "{dto.msg.symbol.NotEmpty}")
    private String symbol;
    /**
     * 固定值类型的值
     */
    private List<Object> value;
    /**
     * 枚举值表示 格式 yyyy-MM-dd 或者 yyyy-MM-dd HH:mm:ss
     * @see DateTimeEnum
     */
    private String dateType;

    public SharePermissionConditionPojo() {
    }

    public SharePermissionConditionPojo(Integer fieldType, String name, String attr, String symbol, List<Object> value) {
        this.fieldType = fieldType;
        this.name = name;
        this.attr = attr;
        this.symbol = symbol;
        this.value = value;
    }
}

